<template>
  <div id="main"></div>
</template>

<script setup>
import { onMounted } from 'vue';
import { useEcharts } from '@/utils/resizeEcharts.js';

const option = {
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [150, 230, 224, 218, 135, 147, 260],
      type: 'line'
    }
  ]
};

onMounted(() => {
  const { echartInstance, setOption, resizeEchart } = useEcharts(document.querySelector('#main'));
  setOption(option);
})
</script>

<style lang="scss" scoped>
  #main {
    width: 1000px;
    height: 1000px;
  }
</style>